package com.dlwx.firefighting.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.dlwx.firefighting.R;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class ShouKuanActivity extends BaseActivity {

    @BindView(R.id.title_left_one_btn)
    ImageView titleLeftOneBtn;
    @BindView(R.id.tv_middle_title)
    TextView tvMiddleTitle;
    @BindView(R.id.tv_money)
    TextView tvMoney;
    @BindView(R.id.tv_name)
    TextView tvName;
    @BindView(R.id.tv_time)
    TextView tvTime;
    @BindView(R.id.tv_confirm)
    TextView tvConfirm;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_shou_kuan);
        ButterKnife.bind(this);
        tvMiddleTitle.setText("收款通知");
        Intent i=getIntent();

        setDatas(i);
    }

    private void setDatas(Intent i) {
        String name=i.getStringExtra("name");
        String money=i.getStringExtra("money");
        String time=i.getStringExtra("time");
        tvMoney.setText(getString(R.string.rmb)+money);
        tvName.setText("付款人："+name);
        tvTime.setText("时间："+time);
    }

    @Override
    protected void onNewIntent(Intent intent) {
        super.onNewIntent(intent);
        setDatas(intent);
    }

    @OnClick({R.id.title_left_one_btn, R.id.tv_confirm})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.title_left_one_btn:
                break;
            case R.id.tv_confirm:
                ShouKuanActivity.this.finish();
                break;
        }
    }
}
